package com.ms.p2p.dao;


import com.ms.p2p.entity.member.Member;
import org.apache.ibatis.annotations.Param;

import java.math.BigDecimal;
import java.util.List;
import java.util.Map;


public interface MemberDao extends CrudDao<Member> {

    int updateFirst(@Param("userId") String userId, @Param("time") String time);

    int updateTenderTimes(@Param("userId") String user_id);

    int updateMobile(@Param("phone") String mobilePhone, @Param("id") Integer id);

    int countByrecommendId(@Param("recommendId") Integer recommend_id);

    int updateKefuByid(@Param("kefuId") String kefu_id, @Param("id") Integer user_id);

    int findNotMyeamal(@Param("id") Integer id, @Param("email") String email);

    Member findById(@Param("userId") int userId);

    Member findByUserName(@Param("userName") String userName);

    Member findByMobilePhone(@Param("phone") String phone);

    Member findByEmail(@Param("email") String email);

    Member findUser(@Param("str") String str);

    int countAllUserTender();

    int countAllUser();

    int updatePayPassword(@Param("pwd") String pwd, @Param("id") int id);

    List<Map<String,Object>> findPager(@Param("userId") String userId, @Param("userName") String userName, @Param("kefuname") String kefuname, @Param("email") String email, @Param("phone") String mobilePhone, @Param("begin_date") String begin_date, @Param("end_date") String end_date, @Param("ru_userId") String ru_userId, @Param("ru_userName") String ru_userName, @Param("ru_mobilePhone") String ru_mobilePhone, @Param("begin") Integer begin, @Param("size") Integer pageSize);


    int findCount(@Param("userId") String userId, @Param("userName") String userName, @Param("kefuname") String kefuname, @Param("email") String email, @Param("phone") String mobilePhone, @Param("begin_date") String begin_date, @Param("end_date") String end_date, @Param("ru_userId") String ru_userId, @Param("ru_userName") String ru_userName, @Param("ru_mobilePhone") String ru_mobilePhone);

    List<Map<String,Object>> findAll(@Param("userId") String userId, @Param("userName") String userName, @Param("kefuname") String kefuname, @Param("email") String email, @Param("phone") String mobilePhone, @Param("begin_date") String begin_date, @Param("end_date") String end_date, @Param("ru_userId") String ru_userId, @Param("ru_userName") String ru_userName, @Param("ru_mobilePhone") String ru_mobilePhone);

    void awardforInviter(@Param("money") BigDecimal money,@Param("user_id") Integer user_id);
}
